package com.shiyi.design.builder;

/**
 * 分离复制对象的创建和表示
 * 相同的创建过程可以有不同的表示
 *
 * @author wangzhanshuai
 * @date 2021/1/27 5:25 下午
 * @since 1.0
 */
public class Client {

    public static void main(String[] args) {
        HouseBuilder houseBuilder = new CommonHouseBuilder();
        House house = houseBuilder.buildWalls().buildDoor().buildWindows().buildRoof().build();
        System.out.println(house);

        Person.PersonBuilder personBuilder = new Person.PersonBuilder();
        Person person = personBuilder.buildBasic(1L, "xiao mi", 18)
                .builderWeight(55)
                .builderScore(100)
                .builder();
        System.out.println(person);
    }
}
